{
 "cells": [
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-03-13T12:11:42.623289Z",
     "start_time": "2025-03-13T12:11:42.614358Z"
    }
   },
   "cell_type": "code",
   "source": [
    "import pandas as pd\n",
    "from pyecharts.charts import Bar\n",
    "from pyecharts import options as opts\n",
    "\n",
    "# 读取数据\n",
    "df = pd.read_csv(\"student_info.csv\")\n",
    "\n",
    "# 按班级分组并计算语文成绩总和\n",
    "class_scores = df.groupby(\"班级\")[\"语文成绩\"].sum().reset_index()\n",
    "\n",
    "# 绘制柱状图\n",
    "bar = Bar()\n",
    "bar.add_xaxis(class_scores[\"班级\"].tolist())\n",
    "bar.add_yaxis(\"语文成绩总和\", class_scores[\"语文成绩\"].tolist())\n",
    "bar.set_global_opts(title_opts=opts.TitleOpts(title=\"各班级语文成绩总和\"))\n",
    "\n",
    "# 渲染图表\n",
    "bar.render_notebook()"
   ],
   "id": "ef7be0ad83ead297",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x2d4f0496c60>"
      ],
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/v5/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"dd2fefcd2907450ab05c11faebb1db39\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_dd2fefcd2907450ab05c11faebb1db39 = echarts.init(\n",
       "                    document.getElementById('dd2fefcd2907450ab05c11faebb1db39'), 'white', {renderer: 'canvas'});\n",
       "                var option_dd2fefcd2907450ab05c11faebb1db39 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"aria\": {\n",
       "        \"enabled\": false\n",
       "    },\n",
       "    \"color\": [\n",
       "        \"#5470c6\",\n",
       "        \"#91cc75\",\n",
       "        \"#fac858\",\n",
       "        \"#ee6666\",\n",
       "        \"#73c0de\",\n",
       "        \"#3ba272\",\n",
       "        \"#fc8452\",\n",
       "        \"#9a60b4\",\n",
       "        \"#ea7ccc\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"\\u8bed\\u6587\\u6210\\u7ee9\\u603b\\u548c\",\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                1634,\n",
       "                1619,\n",
       "                1499\n",
       "            ],\n",
       "            \"realtimeSort\": false,\n",
       "            \"showBackground\": false,\n",
       "            \"stackStrategy\": \"samesign\",\n",
       "            \"cursor\": \"pointer\",\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"margin\": 8,\n",
       "                \"valueAnimation\": false\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u8bed\\u6587\\u6210\\u7ee9\\u603b\\u548c\"\n",
       "            ],\n",
       "            \"selected\": {},\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderRadius\": 0,\n",
       "            \"pageButtonItemGap\": 5,\n",
       "            \"pageButtonPosition\": \"end\",\n",
       "            \"pageFormatter\": \"{current}/{total}\",\n",
       "            \"pageIconColor\": \"#2f4554\",\n",
       "            \"pageIconInactiveColor\": \"#aaa\",\n",
       "            \"pageIconSize\": 15,\n",
       "            \"animationDurationUpdate\": 800,\n",
       "            \"selector\": false,\n",
       "            \"selectorPosition\": \"auto\",\n",
       "            \"selectorItemGap\": 7,\n",
       "            \"selectorButtonGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"enterable\": false,\n",
       "        \"confine\": false,\n",
       "        \"appendToBody\": false,\n",
       "        \"transitionDuration\": 0.4,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5,\n",
       "        \"order\": \"seriesAsc\"\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"animation\": true,\n",
       "            \"animationThreshold\": 2000,\n",
       "            \"animationDuration\": 1000,\n",
       "            \"animationEasing\": \"cubicOut\",\n",
       "            \"animationDelay\": 0,\n",
       "            \"animationDurationUpdate\": 300,\n",
       "            \"animationEasingUpdate\": \"cubicOut\",\n",
       "            \"animationDelayUpdate\": 0,\n",
       "            \"data\": [\n",
       "                \"1\\u73ed\",\n",
       "                \"2\\u73ed\",\n",
       "                \"3\\u73ed\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"animation\": true,\n",
       "            \"animationThreshold\": 2000,\n",
       "            \"animationDuration\": 1000,\n",
       "            \"animationEasing\": \"cubicOut\",\n",
       "            \"animationDelay\": 0,\n",
       "            \"animationDurationUpdate\": 300,\n",
       "            \"animationEasingUpdate\": \"cubicOut\",\n",
       "            \"animationDelayUpdate\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"text\": \"\\u5404\\u73ed\\u7ea7\\u8bed\\u6587\\u6210\\u7ee9\\u603b\\u548c\",\n",
       "            \"target\": \"blank\",\n",
       "            \"subtarget\": \"blank\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"textAlign\": \"auto\",\n",
       "            \"textVerticalAlign\": \"auto\",\n",
       "            \"triggerEvent\": false\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_dd2fefcd2907450ab05c11faebb1db39.setOption(option_dd2fefcd2907450ab05c11faebb1db39);\n",
       "        });\n",
       "    </script>\n"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 17
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-03-13T12:12:37.469083Z",
     "start_time": "2025-03-13T12:12:37.458587Z"
    }
   },
   "cell_type": "code",
   "source": [
    "import pandas as pd\n",
    "from pyecharts.charts import Pie\n",
    "from pyecharts import options as opts\n",
    "\n",
    "# 读取数据\n",
    "df = pd.read_csv(\"student_info.csv\")\n",
    "\n",
    "# 按性别分组并计算数学成绩平均值\n",
    "gender_scores = df.groupby(\"性别\")[\"数学成绩\"].mean().reset_index()\n",
    "\n",
    "# 绘制饼图\n",
    "pie = Pie()\n",
    "pie.add(\"\", [list(z) for z in zip(gender_scores[\"性别\"], gender_scores[\"数学成绩\"])])\n",
    "pie.set_global_opts(title_opts=opts.TitleOpts(title=\"男女数学成绩平均值分布\"))\n",
    "pie.set_series_opts(label_opts=opts.LabelOpts(formatter=\"{b}: {c}\"))\n",
    "\n",
    "# 渲染图表\n",
    "pie.render_notebook()"
   ],
   "id": "6c2eb2813afcd03a",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x2d4efc75d00>"
      ],
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/v5/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"896b803cc6e14b16ac4513f31bb0c502\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_896b803cc6e14b16ac4513f31bb0c502 = echarts.init(\n",
       "                    document.getElementById('896b803cc6e14b16ac4513f31bb0c502'), 'white', {renderer: 'canvas'});\n",
       "                var option_896b803cc6e14b16ac4513f31bb0c502 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"aria\": {\n",
       "        \"enabled\": false\n",
       "    },\n",
       "    \"color\": [\n",
       "        \"#5470c6\",\n",
       "        \"#91cc75\",\n",
       "        \"#fac858\",\n",
       "        \"#ee6666\",\n",
       "        \"#73c0de\",\n",
       "        \"#3ba272\",\n",
       "        \"#fc8452\",\n",
       "        \"#9a60b4\",\n",
       "        \"#ea7ccc\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"pie\",\n",
       "            \"colorBy\": \"data\",\n",
       "            \"legendHoverLink\": true,\n",
       "            \"selectedMode\": false,\n",
       "            \"selectedOffset\": 10,\n",
       "            \"clockwise\": true,\n",
       "            \"startAngle\": 90,\n",
       "            \"minAngle\": 0,\n",
       "            \"minShowLabelAngle\": 0,\n",
       "            \"avoidLabelOverlap\": true,\n",
       "            \"stillShowZeroSum\": true,\n",
       "            \"percentPrecision\": 2,\n",
       "            \"showEmptyCircle\": true,\n",
       "            \"emptyCircleStyle\": {\n",
       "                \"color\": \"lightgray\",\n",
       "                \"borderColor\": \"#000\",\n",
       "                \"borderWidth\": 0,\n",
       "                \"borderType\": \"solid\",\n",
       "                \"borderDashOffset\": 0,\n",
       "                \"borderCap\": \"butt\",\n",
       "                \"borderJoin\": \"bevel\",\n",
       "                \"borderMiterLimit\": 10,\n",
       "                \"opacity\": 1\n",
       "            },\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5973\",\n",
       "                    \"value\": 87.82142857142857\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7537\",\n",
       "                    \"value\": 83.78571428571429\n",
       "                }\n",
       "            ],\n",
       "            \"radius\": [\n",
       "                \"0%\",\n",
       "                \"75%\"\n",
       "            ],\n",
       "            \"center\": [\n",
       "                \"50%\",\n",
       "                \"50%\"\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"margin\": 8,\n",
       "                \"formatter\": \"{b}: {c}\",\n",
       "                \"valueAnimation\": false\n",
       "            },\n",
       "            \"labelLine\": {\n",
       "                \"show\": true,\n",
       "                \"showAbove\": false,\n",
       "                \"length\": 15,\n",
       "                \"length2\": 15,\n",
       "                \"smooth\": false,\n",
       "                \"minTurnAngle\": 90,\n",
       "                \"maxSurfaceAngle\": 90\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u5973\",\n",
       "                \"\\u7537\"\n",
       "            ],\n",
       "            \"selected\": {},\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderRadius\": 0,\n",
       "            \"pageButtonItemGap\": 5,\n",
       "            \"pageButtonPosition\": \"end\",\n",
       "            \"pageFormatter\": \"{current}/{total}\",\n",
       "            \"pageIconColor\": \"#2f4554\",\n",
       "            \"pageIconInactiveColor\": \"#aaa\",\n",
       "            \"pageIconSize\": 15,\n",
       "            \"animationDurationUpdate\": 800,\n",
       "            \"selector\": false,\n",
       "            \"selectorPosition\": \"auto\",\n",
       "            \"selectorItemGap\": 7,\n",
       "            \"selectorButtonGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"enterable\": false,\n",
       "        \"confine\": false,\n",
       "        \"appendToBody\": false,\n",
       "        \"transitionDuration\": 0.4,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5,\n",
       "        \"order\": \"seriesAsc\"\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"text\": \"\\u7537\\u5973\\u6570\\u5b66\\u6210\\u7ee9\\u5e73\\u5747\\u503c\\u5206\\u5e03\",\n",
       "            \"target\": \"blank\",\n",
       "            \"subtarget\": \"blank\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"textAlign\": \"auto\",\n",
       "            \"textVerticalAlign\": \"auto\",\n",
       "            \"triggerEvent\": false\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_896b803cc6e14b16ac4513f31bb0c502.setOption(option_896b803cc6e14b16ac4513f31bb0c502);\n",
       "        });\n",
       "    </script>\n"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 18
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-03-13T12:18:06.711169Z",
     "start_time": "2025-03-13T12:18:06.701812Z"
    }
   },
   "cell_type": "code",
   "source": [
    "from pyecharts.charts import Boxplot\n",
    "from pyecharts import options as opts\n",
    "\n",
    "# 读取数据\n",
    "df = pd.read_csv(\"student_info.csv\")\n",
    "\n",
    "# 按性别分组并提取成绩\n",
    "male_scores = df[df[\"性别\"] == \"男\"][[\"语文成绩\", \"数学成绩\", \"英语成绩\"]].values.tolist()\n",
    "female_scores = df[df[\"性别\"] == \"女\"][[\"语文成绩\", \"数学成绩\", \"英语成绩\"]].values.tolist()\n",
    "\n",
    "# 创建箱线图\n",
    "boxplot = Boxplot()\n",
    "boxplot.add_xaxis([\"语文成绩\", \"数学成绩\", \"英语成绩\"])\n",
    "boxplot.add_yaxis(\"男\", male_scores)\n",
    "boxplot.add_yaxis(\"女\", female_scores)\n",
    "boxplot.set_global_opts(title_opts=opts.TitleOpts(title=\"不同性别学生的成绩分布箱线图\"))\n",
    "boxplot.render_notebook()"
   ],
   "id": "80c414422e1406f3",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x2d4f0739df0>"
      ],
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/v5/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"33c741d650e844c8bb7f971f625128bc\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_33c741d650e844c8bb7f971f625128bc = echarts.init(\n",
       "                    document.getElementById('33c741d650e844c8bb7f971f625128bc'), 'white', {renderer: 'canvas'});\n",
       "                var option_33c741d650e844c8bb7f971f625128bc = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"aria\": {\n",
       "        \"enabled\": false\n",
       "    },\n",
       "    \"color\": [\n",
       "        \"#5470c6\",\n",
       "        \"#91cc75\",\n",
       "        \"#fac858\",\n",
       "        \"#ee6666\",\n",
       "        \"#73c0de\",\n",
       "        \"#3ba272\",\n",
       "        \"#fc8452\",\n",
       "        \"#9a60b4\",\n",
       "        \"#ea7ccc\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"boxplot\",\n",
       "            \"name\": \"\\u7537\",\n",
       "            \"legendHoverLink\": true,\n",
       "            \"hoverAnimation\": true,\n",
       "            \"boxWidth\": [\n",
       "                7,\n",
       "                50\n",
       "            ],\n",
       "            \"selectedMode\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    85,\n",
       "                    90,\n",
       "                    88\n",
       "                ],\n",
       "                [\n",
       "                    78,\n",
       "                    85,\n",
       "                    80\n",
       "                ],\n",
       "                [\n",
       "                    82,\n",
       "                    80,\n",
       "                    87\n",
       "                ],\n",
       "                [\n",
       "                    80,\n",
       "                    82,\n",
       "                    84\n",
       "                ],\n",
       "                [\n",
       "                    75,\n",
       "                    80,\n",
       "                    78\n",
       "                ],\n",
       "                [\n",
       "                    88,\n",
       "                    85,\n",
       "                    82\n",
       "                ],\n",
       "                [\n",
       "                    82,\n",
       "                    84,\n",
       "                    86\n",
       "                ],\n",
       "                [\n",
       "                    76,\n",
       "                    77,\n",
       "                    75\n",
       "                ],\n",
       "                [\n",
       "                    84,\n",
       "                    86,\n",
       "                    88\n",
       "                ],\n",
       "                [\n",
       "                    79,\n",
       "                    80,\n",
       "                    81\n",
       "                ],\n",
       "                [\n",
       "                    83,\n",
       "                    85,\n",
       "                    87\n",
       "                ],\n",
       "                [\n",
       "                    94,\n",
       "                    95,\n",
       "                    96\n",
       "                ],\n",
       "                [\n",
       "                    74,\n",
       "                    75,\n",
       "                    76\n",
       "                ],\n",
       "                [\n",
       "                    81,\n",
       "                    82,\n",
       "                    83\n",
       "                ],\n",
       "                [\n",
       "                    89,\n",
       "                    90,\n",
       "                    91\n",
       "                ],\n",
       "                [\n",
       "                    97,\n",
       "                    98,\n",
       "                    99\n",
       "                ],\n",
       "                [\n",
       "                    72,\n",
       "                    73,\n",
       "                    74\n",
       "                ],\n",
       "                [\n",
       "                    80,\n",
       "                    81,\n",
       "                    82\n",
       "                ],\n",
       "                [\n",
       "                    71,\n",
       "                    72,\n",
       "                    73\n",
       "                ],\n",
       "                [\n",
       "                    95,\n",
       "                    96,\n",
       "                    97\n",
       "                ],\n",
       "                [\n",
       "                    70,\n",
       "                    71,\n",
       "                    72\n",
       "                ],\n",
       "                [\n",
       "                    82,\n",
       "                    83,\n",
       "                    84\n",
       "                ],\n",
       "                [\n",
       "                    94,\n",
       "                    95,\n",
       "                    96\n",
       "                ],\n",
       "                [\n",
       "                    78,\n",
       "                    79,\n",
       "                    80\n",
       "                ],\n",
       "                [\n",
       "                    85,\n",
       "                    86,\n",
       "                    87\n",
       "                ],\n",
       "                [\n",
       "                    96,\n",
       "                    97,\n",
       "                    98\n",
       "                ],\n",
       "                [\n",
       "                    77,\n",
       "                    78,\n",
       "                    79\n",
       "                ],\n",
       "                [\n",
       "                    80,\n",
       "                    81,\n",
       "                    82\n",
       "                ]\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"margin\": 8,\n",
       "                \"valueAnimation\": false\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"label\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"inside\",\n",
       "                    \"color\": \"#fff\",\n",
       "                    \"margin\": 8,\n",
       "                    \"valueAnimation\": false\n",
       "                }\n",
       "            },\n",
       "            \"markLine\": {\n",
       "                \"silent\": false,\n",
       "                \"precision\": 2,\n",
       "                \"label\": {\n",
       "                    \"show\": true,\n",
       "                    \"margin\": 8,\n",
       "                    \"valueAnimation\": false\n",
       "                }\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"boxplot\",\n",
       "            \"name\": \"\\u5973\",\n",
       "            \"legendHoverLink\": true,\n",
       "            \"hoverAnimation\": true,\n",
       "            \"boxWidth\": [\n",
       "                7,\n",
       "                50\n",
       "            ],\n",
       "            \"selectedMode\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    92,\n",
       "                    88,\n",
       "                    90\n",
       "                ],\n",
       "                [\n",
       "                    88,\n",
       "                    92,\n",
       "                    85\n",
       "                ],\n",
       "                [\n",
       "                    90,\n",
       "                    85,\n",
       "                    89\n",
       "                ],\n",
       "                [\n",
       "                    85,\n",
       "                    88,\n",
       "                    90\n",
       "                ],\n",
       "                [\n",
       "                    95,\n",
       "                    93,\n",
       "                    94\n",
       "                ],\n",
       "                [\n",
       "                    78,\n",
       "                    76,\n",
       "                    79\n",
       "                ],\n",
       "                [\n",
       "                    90,\n",
       "                    88,\n",
       "                    92\n",
       "                ],\n",
       "                [\n",
       "                    93,\n",
       "                    94,\n",
       "                    95\n",
       "                ],\n",
       "                [\n",
       "                    87,\n",
       "                    89,\n",
       "                    90\n",
       "                ],\n",
       "                [\n",
       "                    91,\n",
       "                    92,\n",
       "                    93\n",
       "                ],\n",
       "                [\n",
       "                    77,\n",
       "                    78,\n",
       "                    79\n",
       "                ],\n",
       "                [\n",
       "                    86,\n",
       "                    87,\n",
       "                    88\n",
       "                ],\n",
       "                [\n",
       "                    92,\n",
       "                    93,\n",
       "                    94\n",
       "                ],\n",
       "                [\n",
       "                    96,\n",
       "                    97,\n",
       "                    98\n",
       "                ],\n",
       "                [\n",
       "                    73,\n",
       "                    74,\n",
       "                    75\n",
       "                ],\n",
       "                [\n",
       "                    85,\n",
       "                    86,\n",
       "                    87\n",
       "                ],\n",
       "                [\n",
       "                    98,\n",
       "                    99,\n",
       "                    100\n",
       "                ],\n",
       "                [\n",
       "                    99,\n",
       "                    100,\n",
       "                    98\n",
       "                ],\n",
       "                [\n",
       "                    84,\n",
       "                    85,\n",
       "                    86\n",
       "                ],\n",
       "                [\n",
       "                    83,\n",
       "                    84,\n",
       "                    85\n",
       "                ],\n",
       "                [\n",
       "                    97,\n",
       "                    98,\n",
       "                    99\n",
       "                ],\n",
       "                [\n",
       "                    75,\n",
       "                    76,\n",
       "                    77\n",
       "                ],\n",
       "                [\n",
       "                    87,\n",
       "                    88,\n",
       "                    89\n",
       "                ],\n",
       "                [\n",
       "                    92,\n",
       "                    93,\n",
       "                    94\n",
       "                ],\n",
       "                [\n",
       "                    74,\n",
       "                    75,\n",
       "                    76\n",
       "                ],\n",
       "                [\n",
       "                    89,\n",
       "                    90,\n",
       "                    91\n",
       "                ],\n",
       "                [\n",
       "                    93,\n",
       "                    94,\n",
       "                    95\n",
       "                ],\n",
       "                [\n",
       "                    76,\n",
       "                    77,\n",
       "                    78\n",
       "                ]\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"margin\": 8,\n",
       "                \"valueAnimation\": false\n",
       "            },\n",
       "            \"markPoint\": {\n",
       "                \"label\": {\n",
       "                    \"show\": true,\n",
       "                    \"position\": \"inside\",\n",
       "                    \"color\": \"#fff\",\n",
       "                    \"margin\": 8,\n",
       "                    \"valueAnimation\": false\n",
       "                }\n",
       "            },\n",
       "            \"markLine\": {\n",
       "                \"silent\": false,\n",
       "                \"precision\": 2,\n",
       "                \"label\": {\n",
       "                    \"show\": true,\n",
       "                    \"margin\": 8,\n",
       "                    \"valueAnimation\": false\n",
       "                }\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u7537\",\n",
       "                \"\\u5973\"\n",
       "            ],\n",
       "            \"selected\": {},\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderRadius\": 0,\n",
       "            \"pageButtonItemGap\": 5,\n",
       "            \"pageButtonPosition\": \"end\",\n",
       "            \"pageFormatter\": \"{current}/{total}\",\n",
       "            \"pageIconColor\": \"#2f4554\",\n",
       "            \"pageIconInactiveColor\": \"#aaa\",\n",
       "            \"pageIconSize\": 15,\n",
       "            \"animationDurationUpdate\": 800,\n",
       "            \"selector\": false,\n",
       "            \"selectorPosition\": \"auto\",\n",
       "            \"selectorItemGap\": 7,\n",
       "            \"selectorButtonGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"enterable\": false,\n",
       "        \"confine\": false,\n",
       "        \"appendToBody\": false,\n",
       "        \"transitionDuration\": 0.4,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5,\n",
       "        \"order\": \"seriesAsc\"\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"animation\": true,\n",
       "            \"animationThreshold\": 2000,\n",
       "            \"animationDuration\": 1000,\n",
       "            \"animationEasing\": \"cubicOut\",\n",
       "            \"animationDelay\": 0,\n",
       "            \"animationDurationUpdate\": 300,\n",
       "            \"animationEasingUpdate\": \"cubicOut\",\n",
       "            \"animationDelayUpdate\": 0,\n",
       "            \"data\": [\n",
       "                \"\\u8bed\\u6587\\u6210\\u7ee9\",\n",
       "                \"\\u6570\\u5b66\\u6210\\u7ee9\",\n",
       "                \"\\u82f1\\u8bed\\u6210\\u7ee9\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"animation\": true,\n",
       "            \"animationThreshold\": 2000,\n",
       "            \"animationDuration\": 1000,\n",
       "            \"animationEasing\": \"cubicOut\",\n",
       "            \"animationDelay\": 0,\n",
       "            \"animationDurationUpdate\": 300,\n",
       "            \"animationEasingUpdate\": \"cubicOut\",\n",
       "            \"animationDelayUpdate\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"text\": \"\\u4e0d\\u540c\\u6027\\u522b\\u5b66\\u751f\\u7684\\u6210\\u7ee9\\u5206\\u5e03\\u7bb1\\u7ebf\\u56fe\",\n",
       "            \"target\": \"blank\",\n",
       "            \"subtarget\": \"blank\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"textAlign\": \"auto\",\n",
       "            \"textVerticalAlign\": \"auto\",\n",
       "            \"triggerEvent\": false\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_33c741d650e844c8bb7f971f625128bc.setOption(option_33c741d650e844c8bb7f971f625128bc);\n",
       "        });\n",
       "    </script>\n"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 24
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-03-13T12:15:45.035092Z",
     "start_time": "2025-03-13T12:15:45.023750Z"
    }
   },
   "cell_type": "code",
   "source": [
    "import pandas as pd\n",
    "from pyecharts.charts import Line\n",
    "from pyecharts import options as opts\n",
    "\n",
    "# 读取数据\n",
    "df = pd.read_csv(\"student_info.csv\")\n",
    "\n",
    "# 按班级分组并计算各科平均成绩\n",
    "class_scores = df.groupby(\"班级\")[[\"语文成绩\", \"数学成绩\", \"英语成绩\"]].mean().reset_index()\n",
    "\n",
    "# 绘制折线图\n",
    "line = Line()\n",
    "line.add_xaxis(class_scores[\"班级\"].tolist())\n",
    "line.add_yaxis(\"语文成绩平均值\", class_scores[\"语文成绩\"].round(2).tolist())\n",
    "line.add_yaxis(\"数学成绩平均值\", class_scores[\"数学成绩\"].round(2).tolist())\n",
    "line.add_yaxis(\"英语成绩平均值\", class_scores[\"英语成绩\"].round(2).tolist())\n",
    "line.set_global_opts(title_opts=opts.TitleOpts(title=\"各班级三科成绩平均值\")\n",
    "                     ,toolbox_opts=opts.ToolboxOpts(\n",
    "        is_show=True,\n",
    "    ))\n",
    "\n",
    "# 渲染图表\n",
    "line.render_notebook()"
   ],
   "id": "e48a2f7ad69025f0",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x2d4ee20f680>"
      ],
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/v5/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"0264c76f94994010beda944bfd975ed7\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_0264c76f94994010beda944bfd975ed7 = echarts.init(\n",
       "                    document.getElementById('0264c76f94994010beda944bfd975ed7'), 'white', {renderer: 'canvas'});\n",
       "                var option_0264c76f94994010beda944bfd975ed7 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"aria\": {\n",
       "        \"enabled\": false\n",
       "    },\n",
       "    \"color\": [\n",
       "        \"#5470c6\",\n",
       "        \"#91cc75\",\n",
       "        \"#fac858\",\n",
       "        \"#ee6666\",\n",
       "        \"#73c0de\",\n",
       "        \"#3ba272\",\n",
       "        \"#fc8452\",\n",
       "        \"#9a60b4\",\n",
       "        \"#ea7ccc\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u8bed\\u6587\\u6210\\u7ee9\\u5e73\\u5747\\u503c\",\n",
       "            \"connectNulls\": false,\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"stackStrategy\": \"samesign\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"1\\u73ed\",\n",
       "                    86.0\n",
       "                ],\n",
       "                [\n",
       "                    \"2\\u73ed\",\n",
       "                    85.21\n",
       "                ],\n",
       "                [\n",
       "                    \"3\\u73ed\",\n",
       "                    83.28\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"margin\": 8,\n",
       "                \"valueAnimation\": false\n",
       "            },\n",
       "            \"logBase\": 10,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u6570\\u5b66\\u6210\\u7ee9\\u5e73\\u5747\\u503c\",\n",
       "            \"connectNulls\": false,\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"stackStrategy\": \"samesign\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"1\\u73ed\",\n",
       "                    87.16\n",
       "                ],\n",
       "                [\n",
       "                    \"2\\u73ed\",\n",
       "                    86.68\n",
       "                ],\n",
       "                [\n",
       "                    \"3\\u73ed\",\n",
       "                    83.44\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"margin\": 8,\n",
       "                \"valueAnimation\": false\n",
       "            },\n",
       "            \"logBase\": 10,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u82f1\\u8bed\\u6210\\u7ee9\\u5e73\\u5747\\u503c\",\n",
       "            \"connectNulls\": false,\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"stackStrategy\": \"samesign\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"1\\u73ed\",\n",
       "                    87.79\n",
       "                ],\n",
       "                [\n",
       "                    \"2\\u73ed\",\n",
       "                    87.05\n",
       "                ],\n",
       "                [\n",
       "                    \"3\\u73ed\",\n",
       "                    84.94\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"margin\": 8,\n",
       "                \"valueAnimation\": false\n",
       "            },\n",
       "            \"logBase\": 10,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u8bed\\u6587\\u6210\\u7ee9\\u5e73\\u5747\\u503c\",\n",
       "                \"\\u6570\\u5b66\\u6210\\u7ee9\\u5e73\\u5747\\u503c\",\n",
       "                \"\\u82f1\\u8bed\\u6210\\u7ee9\\u5e73\\u5747\\u503c\"\n",
       "            ],\n",
       "            \"selected\": {},\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderRadius\": 0,\n",
       "            \"pageButtonItemGap\": 5,\n",
       "            \"pageButtonPosition\": \"end\",\n",
       "            \"pageFormatter\": \"{current}/{total}\",\n",
       "            \"pageIconColor\": \"#2f4554\",\n",
       "            \"pageIconInactiveColor\": \"#aaa\",\n",
       "            \"pageIconSize\": 15,\n",
       "            \"animationDurationUpdate\": 800,\n",
       "            \"selector\": false,\n",
       "            \"selectorPosition\": \"auto\",\n",
       "            \"selectorItemGap\": 7,\n",
       "            \"selectorButtonGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"enterable\": false,\n",
       "        \"confine\": false,\n",
       "        \"appendToBody\": false,\n",
       "        \"transitionDuration\": 0.4,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5,\n",
       "        \"order\": \"seriesAsc\"\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"animation\": true,\n",
       "            \"animationThreshold\": 2000,\n",
       "            \"animationDuration\": 1000,\n",
       "            \"animationEasing\": \"cubicOut\",\n",
       "            \"animationDelay\": 0,\n",
       "            \"animationDurationUpdate\": 300,\n",
       "            \"animationEasingUpdate\": \"cubicOut\",\n",
       "            \"animationDelayUpdate\": 0,\n",
       "            \"data\": [\n",
       "                \"1\\u73ed\",\n",
       "                \"2\\u73ed\",\n",
       "                \"3\\u73ed\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"animation\": true,\n",
       "            \"animationThreshold\": 2000,\n",
       "            \"animationDuration\": 1000,\n",
       "            \"animationEasing\": \"cubicOut\",\n",
       "            \"animationDelay\": 0,\n",
       "            \"animationDurationUpdate\": 300,\n",
       "            \"animationEasingUpdate\": \"cubicOut\",\n",
       "            \"animationDelayUpdate\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"text\": \"\\u5404\\u73ed\\u7ea7\\u4e09\\u79d1\\u6210\\u7ee9\\u5e73\\u5747\\u503c\",\n",
       "            \"target\": \"blank\",\n",
       "            \"subtarget\": \"blank\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"textAlign\": \"auto\",\n",
       "            \"textVerticalAlign\": \"auto\",\n",
       "            \"triggerEvent\": false\n",
       "        }\n",
       "    ],\n",
       "    \"toolbox\": {\n",
       "        \"show\": true,\n",
       "        \"orient\": \"horizontal\",\n",
       "        \"itemSize\": 15,\n",
       "        \"itemGap\": 10,\n",
       "        \"left\": \"80%\",\n",
       "        \"feature\": {\n",
       "            \"saveAsImage\": {\n",
       "                \"type\": \"png\",\n",
       "                \"backgroundColor\": \"auto\",\n",
       "                \"connectedBackgroundColor\": \"#fff\",\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u4fdd\\u5b58\\u4e3a\\u56fe\\u7247\",\n",
       "                \"pixelRatio\": 1\n",
       "            },\n",
       "            \"restore\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u8fd8\\u539f\"\n",
       "            },\n",
       "            \"dataView\": {\n",
       "                \"show\": true,\n",
       "                \"title\": \"\\u6570\\u636e\\u89c6\\u56fe\",\n",
       "                \"readOnly\": false,\n",
       "                \"lang\": [\n",
       "                    \"\\u6570\\u636e\\u89c6\\u56fe\",\n",
       "                    \"\\u5173\\u95ed\",\n",
       "                    \"\\u5237\\u65b0\"\n",
       "                ],\n",
       "                \"backgroundColor\": \"#fff\",\n",
       "                \"textareaColor\": \"#fff\",\n",
       "                \"textareaBorderColor\": \"#333\",\n",
       "                \"textColor\": \"#000\",\n",
       "                \"buttonColor\": \"#c23531\",\n",
       "                \"buttonTextColor\": \"#fff\"\n",
       "            },\n",
       "            \"dataZoom\": {\n",
       "                \"show\": true,\n",
       "                \"title\": {\n",
       "                    \"zoom\": \"\\u533a\\u57df\\u7f29\\u653e\",\n",
       "                    \"back\": \"\\u533a\\u57df\\u7f29\\u653e\\u8fd8\\u539f\"\n",
       "                },\n",
       "                \"icon\": {},\n",
       "                \"filterMode\": \"filter\"\n",
       "            },\n",
       "            \"magicType\": {\n",
       "                \"show\": true,\n",
       "                \"type\": [\n",
       "                    \"line\",\n",
       "                    \"bar\",\n",
       "                    \"stack\",\n",
       "                    \"tiled\"\n",
       "                ],\n",
       "                \"title\": {\n",
       "                    \"line\": \"\\u5207\\u6362\\u4e3a\\u6298\\u7ebf\\u56fe\",\n",
       "                    \"bar\": \"\\u5207\\u6362\\u4e3a\\u67f1\\u72b6\\u56fe\",\n",
       "                    \"stack\": \"\\u5207\\u6362\\u4e3a\\u5806\\u53e0\",\n",
       "                    \"tiled\": \"\\u5207\\u6362\\u4e3a\\u5e73\\u94fa\"\n",
       "                },\n",
       "                \"icon\": {}\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "};\n",
       "                chart_0264c76f94994010beda944bfd975ed7.setOption(option_0264c76f94994010beda944bfd975ed7);\n",
       "        });\n",
       "    </script>\n"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 21
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": "",
   "id": "3279011379e7c66c"
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
